<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<tiles:insert page="/general/templateLoggedIn.jsp">
	<tiles:put name="title" value="Name Page"/>
	<tiles:put name="nav"/>
	<tiles:put name="content" type="string">
	
		<h2>Previous Data:</h2>
		<c:set var="us" value="United States"/>
		<ol class="tree">
			<li><label for="general">General Information</label><input type="checkbox" id="general" />
				<ol> 
					<li>
						<table>
							<tr><td>First Name:</td><td><c:out value="${sessionScope.applicant.firstName}"/></td></tr>
							<tr><td>Middle Initial:</td><td><c:out value="${sessionScope.applicant.middleInitial}"/></td></tr>
							<tr><td>Last Name:</td><td><c:out value="${sessionScope.applicant.name}"/></td></tr>
							<tr><td>Country of Citizenship:</td><td><c:out value="${sessionScope.applicant.countryOfCitizenship}"/></td></tr>
							<tr><td>Country of Residence:</td><td><c:out value="${sessionScope.applicant.countryOfResidence}"/></td></tr>
							<tr><td>Street:</td><td><c:out value="${sessionScope.applicant.street}"/></td></tr>
							<tr><td>City:</td><td><c:out value="${sessionScope.applicant.city}"/></td></tr>
							<tr><td>ZIP/Postal Code:</td><td><c:out value="${sessionScope.applicant.zip}"/></td></tr>
							<c:choose>
								<c:when test="${sessionScope.applicant.usResidence == true}">
									<tr><td>State:</td><td>${sessionScope.applicant.state}</td></tr>
								</c:when>
								<c:otherwise>	
									<tr><td>Country Phone Code:</td><td>${sessionScope.applicant.countryPhoneCode}</td></tr>
								</c:otherwise>
							</c:choose>
							<tr><td>Area code:</td><td>${sessionScope.applicant.areaCode}</td></tr>
							<tr><td>Number:</td><td>${sessionScope.applicant.number}</td></tr>
						</table>
					</li>
				</ol>
			</li>
		</ol>
		<hr>
		<br>
			
		<h2>Application</h2>
			
		<html:form action="/residency">	
			<table>
				<tr><td>US permanent residence:</td>
					<td><html:radio property="usResidence" value="true"/></td>
				</tr>
				<tr><td>Non US permanent residence:</td>
					<td><html:radio property="usResidence" value="false"/></td>
				</tr>
			</table>
			<input type="submit" value="Next">
		</html:form>

	</tiles:put>
</tiles:insert>